﻿@model Abhimanu.Mobile.Models.QuestionModel
@{
    ViewBag.Title = "Give Test";
    Layout = "~/Views/Shared/M/_StudentLayout.cshtml";
}
<a data-role="button" class="no-Ajax"   style="float:left" href="@Url.Action("SelectTest", "Student")">
    Back</a>
<br />
<br />
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <ul data-role="listview" data-inset="true" data-theme="d" data-divider-theme="a">
        <li data-role="list-divider">Online Test</li>
        <li>
            @Model.Question
        </li>
        <li>A) @Model.AnswerA
        </li>
        <li>B) @Model.AnswerB
        </li>
        <li>C) @Model.AnswerC
        </li>
        <li>D) @Model.AnswerD
        </li>
        <li>Please select correct answer (A/B/C/D)... @Html.TextBoxFor(model => model.Answer)
        </li>
        <li>
            @if(Model.PageID < Model.TotalCount){
                <a href="@Url.Action("GiveTest", "Student", new { examId = Model.ExamID, pageno = Model.PageID + 1 })">
                    Next </a>
                }
        </li>
        <li>
            @if(Model.PageID > 1){
                <a href="@Url.Action("GiveTest", "Student", new { examId = Model.ExamID, pageno = Model.PageID - 1 })">
                    Previous </a>
                }
        </li>
    </ul>
    if(Model.PageID == Model.TotalCount){
    <input type="submit" value="Submit" data-theme="a" data-form="ui-btn-up-a" style="width: 70px;" />
    }
    
}
@section scripts
{
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
}
